** Experiment
**By Mahdi Hashemian
**Version1: March,2016
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
set more off

*Selecting First Analysis for two types with SDs that relatively close
drop if SD>1
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge

** Now lets look at the alternative where the SDs are Far enough
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
drop if SD>2 | SD<1
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge

*
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
drop if SD>3 |  SD<2
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge

*
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
drop if SD>4 |  SD<3
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge

*
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
drop if SD>5 |  SD<4
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge
**
clear
use "/Users/mhashemi/Dropbox (MIT)/Gov 2001 Replication Paper/Exponential Alternative/experimentv3.dta"
drop if SD<5
xtset Journal
gen after1990=0
replace after1990=1 if year>=1990
gen after1990type=0
replace after1990type=1 if type==1
replace after1990type=after1990type*after1990
xtreg  lncoauthor  after1990type _I*, robust cluster(Journal)
outreg using exp.doc, merge

drop if year>1990
xtset Journal
gen after1980=0
replace after1980=1 if year>=1980
gen after1980type=0
replace after1980type=1 if type==1
replace after1980type=after1980type*after1980
xtreg  lncoauthor  after1980type _I*, robust cluster(Journal)
outreg using exp.doc, merge
